<div class="sys-param-container" [@flyIn]="'active'">
  <form class="form-vertical" role="form">
    <div class="row">
      <div class="col-sm-12">
        <div class="input-group">
          <input class="form-control" type="text" placeholder="内容，用户名">
          <span class="input-group-btn">
                        <button class="btn btn-default" type="button"><i class="fa fa-search" aria-hidden="true"></i> 搜索</button>
                    </span>
        </div>
      </div>
    </div>
  </form>
  <div class="row">
    <div class="col-sm-12">
      <div class="post-item-container">
        <table class="table table-bordered table-condensed">
          <thead>
          <tr>
            <th>序号</th>
            <th>名称</th>
            <th>值</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let option of optionList">
            <td>{{option.id}}</td>
            <td>{{option.name}}</td>
            <td>{{option.value}}</td>
            <td>
              <a href="javascript:void(0);" (click)="editPost(option)"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
      <pagination [totalItems]="totalItems" [maxSize]="maxSize" [itemsPerPage]="itemsPerPage" [(ngModel)]="currentPage"
                  firstText="首页" lastText="末页"
                  previousText="上一页" nextText="下一页"
                  [boundaryLinks]="true" [rotate]="false" (numPages)="numPages = $event"
                  (pageChanged)="pageChanged($event)" class="pagination-sm"></pagination>
    </div>
  </div>


  <div *ngIf="editOption" class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">编辑--{{editOption.name}}</h3>
    </div>
    <div class="panel-body">
      <form class="form-horizontal" role="form">
        <div class="form-group">
          <label class="col-sm-2 control-label">值</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" placeholder="请输入值" [(ngModel)]="editOption.value" name="email">
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-9">
            <button type="submit" class="btn btn-success" (click)="save($event)">保存</button>
          </div>
        </div>
      </form>
    </div>
  </div>



</div>
